<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>测试扫码支付</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"  content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
</head>
<style>
	.qrcode_params span{
		display:-moz-inline-box;
		display:inline-block;
		width: 100px;
		text-align: left;
	}
	
	.qrcode_params input{
		display:-moz-inline-box;
		display:inline-block;
		width: 300px;
	}
</style>
<body>
	<div class="qrcode_params" style="margin: 0 auto;text-align: center;top: 300px">
		<span>Url地址：</span><input id="url" value="https://twxapp.itc-pay.com/app/trans/qrcode">
		<br>
		<span>交易码：</span><input id="transacSeq" value="${transacSeq}">
		<br>
		<span>金     额：</span><input id="tollFare" value="1">
		<br>
		<span>车牌号：</span><input id="carPlate" value="京T00000">
		<br>
		<span>时     间：</span><input id="tollTime" value="${tollTime}">
		<br>
		<span>设备编号：</span><input id="deviceId" value="2">
		<br>
		<span>KEY：</span><input id="key" value="1">
		<br>
		<br>
		<button id="submitQrcode" >生成二维码 </button>
		<div id="qrcode" style="margin: 100px auto"></div>
	</div>
	
<script src="../resources/script/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="../resources/script/jquery.qrcode.min.js" type="text/javascript"></script>
<script type="text/javascript">

	window.onload=function(){
		$('#submitQrcode').click(function(){
			var urlArray = [];
			urlArray.push($('#url').val()+'?');
			urlArray.push('transacSeq='+$('#transacSeq').val());
			urlArray.push('&tollFare='+$('#tollFare').val());
			urlArray.push('&tollTime='+$('#tollTime').val());
			urlArray.push('&deviceId='+$('#deviceId').val());
			urlArray.push('&key='+$('#key').val());
			urlArray.push('&carPlate='+$('#carPlate').val());
			var url = urlArray.join('');
			console.log(url);
			$('#qrcode').html('');
			$('#qrcode').qrcode(url);
		});
	}
	
</script>
</body>
</html>
